<%-- 
    Document   : dao4
    Created on : 2014/8/20, 下午 03:28:36
    Author     : gjun
--%>

<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:useBean class="dao.BaseDAO" id="y" />
<%
    String sql="select id , username , tel ,birthday from person";
    String ary[]={};
    ArrayList list = y.query(sql, ary);
    System.out.println(list);
    //request.setAttribute("list", list);
    %>
    <c:set var="list" value="<%= list %>" />
    <!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <c:forEach var="x" items="${list}"  >
            <c:out value="${x.username}" /> , <c:out value="${x.tel}" /> ,<c:out value="${x.birthday}" /> <br>
        </c:forEach>   
            
        
    </body>
</html>
